<div ng-include="sys_html('common/_header')"></div>
<style>
.fui-btn-c {
    height: auto;
    background: #22ad0c;
    margin: 0.6rem 0.3rem;
    padding: 0.4rem;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
	justify-content:center;
	box-shadow: 0 8px 6px #1e970a;
    align-items: center;
	color:#fff;
    position: relative;
	border-radius:2rem;
}

.fui-btn-c .icon {
	font-size:1rem;
	padding-right:0.3rem;
	text-align:right;
}

.fui-btn-c .info {
	text-align:left;
    padding-right: 0.2rem;
    font-size: 0.75rem;
}

.fui-btn-c .info p {
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.weui_cells_radio2 .weui_check:checked + .weui_icon_checked:before {
  color: #09ba07;
}
.fui-icon-group .fui-icon-col {
    margin: 0.1rem 0;
}
.carousel {margin-top:0}
.fui-header:after {
	border-bottom: 0 solid #D9D9D9;
}
.bottombg {position: absolute;width:100%;height:3.5rem;border-bottom-right-radius:100% 10rem;border-bottom-left-radius:100% 1rem;}
.fui-searchbar {padding-top:0.3rem;padding-bottom:0.3rem;margin-top:-2rem;height:auto;border-top-right-radius:1rem;border-top-left-radius:1rem;}
.searchbar .search-input input {
    height: 1.6rem;
}
.search-input i {
    line-height: 1.7rem;
}
.jylabels {
    display: inline;
    padding: 0 0.5rem;
    margin: 0.2rem;
    font-size: 0.55rem;
    line-height: 1.1rem;
    text-align: center;
    border-radius: 0.6rem;
}
.fui-header a.back:before {
	border-color: #fff
}
.fui-header a.back2:before {
	content: " ";
	display: inline-block;
	-webkit-transform: rotate(45deg);
	-ms-transform: rotate(45deg);
	transform: rotate(45deg);
	height: 0.5rem;
	width: 0.5rem;
	border-width: 0 0 2px 2px;
	border-color: #666;
	border-style: solid;
	position: relative;
	top:0;
}
.carousel {margin-top:0}

.myshop-header {height: auto; background: #fff; overflow: hidden;}
.myshop-header .image {height: 5rem;}
.myshop-header .image img {height: 5rem; width: 100%; display: block;}
.myshop-header .menus {height: 0.5rem; background: #fff; padding: 0.3rem 0 0.3rem 5rem; position: relative; display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;}
.myshop-header .menus .shopname {height: 2rem; position: absolute; top: -2.2rem; left: 4.8rem; color:#fff}
.myshop-header .menus .shoplogo {height: 3.5rem; width: 3.5rem; background: #fff; position: absolute; top: -2.5rem; left: 0.8rem; border: 1px solid #eee;border-radius: .2rem}
.myshop-header .menus .shoplogo img {height: 100%; width: 100%; display: block;border-radius: .2rem}
.myshop-header .menus .nav {width: 100%; text-align: center; position: relative; line-height: 2.0rem; font-size: 0.7rem; color: #1e313c;}
.myshop-header .menus .nav:before {content: " "; position: absolute; top: 0; left: 0; width: 0; height: 100%; border-left: 1px solid #f2f2f2;}
.myshop-header .menus .nav p {padding: 0; margin: 0; line-height: inherit;}
.myshop-header .menus .nav i {font-size: .75rem;}
</style>
<div class="fui-page" ng-if="pagedata.isshowarea !=1">
	<div class="fui-content" style="background:#f2f5fc">
		<div class="searchtop" style="height:3rem;background:linear-gradient(to bottom, #f8dfd8, #f2f5fc);">
			<div class="fui-cellone" style="padding:0.3rem;padding-top:0.5rem">
				<div class="fui-cellone-label">
					<i ng-if="pagedata.pluginset.is_onecity!=1" class="icon jinyunicon icon-map" style="font-size: 0.65rem;margin-right:10px" ng-click="pagedata.isshowarea=1" >
						{{pagedata.pcd.city||'未获取城市'}}
					</i>
					<i ng-if="pagedata.pluginset.is_onecity==1" class="icon jinyunicon icon-map" style="font-size: 0.65rem;margin-right:10px">
						{{pagedata.pcd.city||'未获取城市'}}
					</i>
				 </div>
				 <div class="fui-cellone-info">
					<div class="search-input" style="height:1.6rem;padding-right:1rem">
						<form action="javascript:return true">
						<i id="searchsub" class="icon icon-sousuo1 bold" ng-click="pagedata.getlist()" style="line-height: 1.7rem;"></i>
						<input type="search" placeholder="请输入商家名称" class="search" ng-model="pagedata.params.keyword" style="height:1.6rem;border: 0;text-align: left; color: #999; font-size:0.6rem;border: 2px solid red;background:#fff;border-radius: 1rem;" />
						</form>
						<span ng-click="pagedata.getlist()" class="label label-success" ng-click="pagedata.getlist()" style="position: absolute; font-size: 0.65rem; background:red;color: #fff; top: 0.25rem; right: 1.4rem;border-radius:1rem">搜索</span>
					</div>
				 </div>
			</div>
		</div>
		<div class="radius" style="margin:0.3rem;margin-top:3.5rem">
			<div ng-include="sys_html('common/_merchgroups')"></div>
		</div>
		<div class="fui-list-group" style="margin-top:0;background:none;padding:0 0.2rem">
				<ul class="fui-list" style="font-size:0.65rem;padding:0 0.5rem">
					<li ng-click="pagedata.golist('showlist',0);" class="fui-list-inner bold"><span>综合排序</span><i class="icon icon-moreunfold"></i></li>
					<li class="fui-list-inner"><span></span></li>
					<li ng-click="pagedata.golist('showlist',2);" class="fui-list-inner r"><span>配送速度</span><i class="icon icon-moreunfold"></i></li>
					<li ng-click="pagedata.golist('showlist',3);" class="fui-list-inner r"><span>全部筛选</span><i class="icon icon-moreunfold"></i></li>
				</ul>
				<div class="row margin0" style="padding:0 0.3rem">
					<div class="col-jy-4">
							<div ng-class="{'yuyue-duan':1,'active':pagedata.params.star==5}" style="width:auto" ng-click="pagedata.getlist();pagedata.params.star=5;pagedata.params.order=''">
									<div>5星好评</div>
									<div class="clear"></div>
							</div>
					</div>
					<div class="col-jy-4">
							<div ng-class="{'yuyue-duan':1,'active':pagedata.params.order=='star'}" style="width:auto" ng-click="pagedata.getlist('','star');">
									<div>点评高分</div>
									<div class="clear"></div>
							</div>
					</div>
					<div class="col-jy-4">
							<div ng-class="{'yuyue-duan':1,'active':pagedata.params.order=='brand'}" style="width:auto" ng-click="pagedata.getlist('','brand');">
									<div>品牌商家</div>
									<div class="clear"></div>
							</div>
					</div>
					<div class="col-jy-4">
							<div ng-class="{'yuyue-duan':1,'active':pagedata.params.order=='salenum'}" style="width:auto" ng-click="pagedata.getlist('','salenum');">
									<div>销量较高</div>
									<div class="clear"></div>
							</div>
					</div>
				</div>
		</div>
		<div ng-if="!pagedata.showgoods" class="fui-list-group merchgroup" style="background:none;">
			<div ng-include="sys_html('common/_merchlist')"></div>
			<div ng-if="!loading && (!pagedata.list || pagedata.list.length<1)" class='content-empty' style="margin-top:0">
					<i class='icon icon-lianxishangjia'></i>
					<div>暂时没有任何相关店铺</div>
			</div>
		</div>
		<div ng-if="pagedata.showgoods" class="fui-goods-group block">
				<div ng-include="sys_html('common/_goodslist')"></div>
			</div>
		<div ng-show="loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
		<div ng-include="sys_html('common/_copyright',true)"></div>
	</div>
</div>
<div ng-include="sys_html('common/_area')"></div>
<div ng-include="sys_html('common/_search')"></div>
<script type="text/javascript">
scope.pagedata.post={'sendtype':1,'dayid':0}
scope.pagedata.getlist=function(type,order){
	scope.pagedata.isgolist = false;
	scope.pagedata.params.page=1;
	if(order){
		scope.pagedata.params.order=order;
	}
	if(scope.pagedata.params.order){
		scope.pagedata.params.star='';
	}
	if(scope.pagedata.params.star){
		scope.pagedata.params.order='';
	}
	scope.loading=true;
	setTimeout(function(){
		scope.loading=false;
		scope.$evalAsync();
	},500);	
	scope.tool.get_list('jy_newpaimerch/index/getmerchs/islike=1',true)
}
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_newpaimerch/index/getmerchs/islike=1');
}
scope.pagedata.golist=function(id,paramstype){
	scope.pagedata.isgolist = true;
	scope.pagedata.paramstype = paramstype;
	scope.$evalAsync();
}
</script>
<script>
scope.pagedata.issocketmsg=false;
scope.pagedata.tanmuspage=0;
scope.pagedata.nowmsgid=0;
scope.pagedata.gettanmus=function() {
	if(!scope.pagedata.issocketmsg){
			scope.get('jy_weishop/get_data/gettanmus/page='+scope.pagedata.tanmuspage,function(res){
						//console.log(res);
						scope.pagedata.tanmus=res.list
						if(scope.pagedata.tanmus.length>0){
							scope.pagedata.tanmuspage++;
							scope.pagedata.up_oldtanmu();
						}
			});
	}
}
//刚进入时；如果没有新订单消息，就弹储备订单消息
if(scope.pagedata.pluginset.no_tanmu!=1){
		setTimeout(function(){
			scope.pagedata.gettanmus();
		},2000);
}
scope.pagedata.up_oldtanmu=function() {
		if(scope.page.action=='merchlist'){
			var i=scope.pagedata.nowmsgid;
			if(i<scope.pagedata.tanmus.length){
				set_tanmu(scope.pagedata.tanmus[i].nickname,scope.pagedata.tanmus[i].avatar,scope.pagedata.tanmus[i].time);
			}else{
				scope.pagedata.gettanmus();
			}
		}else{
			return false;
		}
}
function set_tanmu(nickname,avatar,time) {
		scope.pagedata.nowmsgid++
		scope.pagedata.showtanmus=true
		scope.$evalAsync(scope.pagedata.showtanmus);
		setTimeout(function(){
			scope.pagedata.transition=true
			scope.$evalAsync(scope.pagedata.transition);	
		},300);
		setTimeout(function(){
			scope.pagedata.showtanmus=false
			scope.pagedata.transition=false
			scope.$evalAsync(scope.pagedata.showtanmus);	
		},2000);
		setTimeout(function(){
			//等待5秒，如果没有新的订单消息，就弹储备订单消息
			scope.pagedata.issocketmsg=scope.pagedata.issocketmsg?scope.pagedata.issocketmsg:false;
			if(!scope.pagedata.issocketmsg && scope.page.action=='index'){
				scope.pagedata.up_oldtanmu();
			}
		},4000);
}
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
</script>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<div ng-include="sys_html('common/_coupon',true)"></div>
<div ng-include="sys_html('common/_gotop',true)"></div>
<div ng-include="sys_html('common/_share','','','jy_weishop')"></div>
<!--弹目-->
<div ng-if="pagedata.showtanmus && !pagedata.pluginset.no_tanmu" class="video-sms-pane {{pagedata.transition?'transition':''}}">
		<div class="video-sms-text">
			<image class="video-sms-logo" src="{{pagedata.tanmus[pagedata.nowmsgid].avatar}}"/>
			<span class="overflow-h"> 最新订单来自 {{pagedata.tanmus[pagedata.nowmsgid].nickname}}</span>
		</div>
</div>